import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
	id("org.springframework.boot") version "3.2.4"
	id("io.spring.dependency-management") version "1.1.4"
	kotlin("jvm") version "1.9.23"
	kotlin("plugin.spring") version "1.9.23"
	application
}

group = "ru.classbase"
version = "1.0-SNAPSHOT"

java {
	sourceCompatibility = JavaVersion.VERSION_21
}

repositories {
	mavenCentral()
}

dependencies {
	implementation("org.springframework.boot:spring-boot-starter")
	implementation("org.springframework.boot:spring-boot-starter-jdbc")
	implementation("org.jetbrains.kotlin:kotlin-reflect")
	implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
	implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
	implementation("com.opencsv:opencsv:5.9")
	implementation ("com.google.api-client:google-api-client:2.4.0")
	implementation ("com.google.oauth-client:google-oauth-client-jetty:1.35.0")
	implementation ("com.google.apis:google-api-services-drive:v3-rev20220815-2.0.0")
	//implementation("com.google.auth:google-auth-library-credentials:1.23.0")

	runtimeOnly("org.postgresql:postgresql")
	runtimeOnly("org.apache.logging.log4j:log4j-slf4j2-impl")

	testImplementation("org.springframework.boot:spring-boot-starter-test")
}

application {
	mainClass = "ru.classbase.dbdumper.DbDumper"
}
tasks.withType<KotlinCompile> {
	kotlinOptions {
		freeCompilerArgs += "-Xjsr305=strict"
		jvmTarget = "21"
	}
}

tasks.withType<Test> {
	useJUnitPlatform()
}
